package com.health.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.time.LocalDate;

@TableName("user")
public class UserModel {

    

        @TableId(value = "id", type = IdType.AUTO)
        // id
        
        private Integer id;
    

        
        // 用户名
        
        private String userName;
    

        
        // 密码
        
        private String password;
    

        
        // 权限
        
        private Integer role;
    

        
        // 身高
        
        private String height;
    

        
        // 体重
        
        private String weight;
    

        
        // 低血压值
        
        private String hypotensiveValue;
    

        
        // 高血压值
        
        private String hypertensiveValue;
    

        
        // 血糖值
        
        private String bloodGlucoseValue;
    

        
        // 血脂值
        
        private String bloodLipidValue;
    

        
        // 50米短跑完成秒数
        private String meterDashTime;
    

        
        // 引体向上次数
        
        private String pullUpTimes;
    

        
        // 俯卧撑次数
        
        private String pushUpTimes;
    

    
        public Integer getId() {
            return this.id;
        }
        public void setId(Integer id) {
            this.id = id;
        }
    
        public String getUserName() {
            return this.userName;
        }
        public void setUserName(String userName) {
            this.userName = userName;
        }
    
        public String getPassword() {
            return this.password;
        }
        public void setPassword(String password) {
            this.password = password;
        }
    
        public Integer getRole() {
            return this.role;
        }
        public void setRole(Integer role) {
            this.role = role;
        }
    
        public String getHeight() {
            return this.height;
        }
        public void setHeight(String height) {
            this.height = height;
        }
    
        public String getWeight() {
            return this.weight;
        }
        public void setWeight(String weight) {
            this.weight = weight;
        }
    
        public String getHypotensiveValue() {
            return this.hypotensiveValue;
        }
        public void setHypotensiveValue(String hypotensiveValue) {
            this.hypotensiveValue = hypotensiveValue;
        }
    
        public String getHypertensiveValue() {
            return this.hypertensiveValue;
        }
        public void setHypertensiveValue(String hypertensiveValue) {
            this.hypertensiveValue = hypertensiveValue;
        }
    
        public String getBloodGlucoseValue() {
            return this.bloodGlucoseValue;
        }
        public void setBloodGlucoseValue(String bloodGlucoseValue) {
            this.bloodGlucoseValue = bloodGlucoseValue;
        }
    
        public String getBloodLipidValue() {
            return this.bloodLipidValue;
        }
        public void setBloodLipidValue(String bloodLipidValue) {
            this.bloodLipidValue = bloodLipidValue;
        }
    
        public String getMeterDashTime() {
            return this.meterDashTime;
        }
        public void setMeterDashTime(String meterDashTime) {
            this.meterDashTime = meterDashTime;
        }
    
        public String getPullUpTimes() {
            return this.pullUpTimes;
        }
        public void setPullUpTimes(String pullUpTimes) {
            this.pullUpTimes = pullUpTimes;
        }
    
        public String getPushUpTimes() {
            return this.pushUpTimes;
        }
        public void setPushUpTimes(String pushUpTimes) {
            this.pushUpTimes = pushUpTimes;
        }
    
        public Double getBMI() {
            double height = Double.parseDouble(this.height);
            double weight = Double.parseDouble(this.weight);
            DecimalFormat df = new DecimalFormat("#.00");
            return Double.parseDouble(df.format(weight / ((height / 100) * (height / 100))));
        }
}
